دسته
آرشیو
آمار وبلاگ
تعداد بازدید : 3213
تعداد نوشته ها : 10
تعداد نظرات : 0
Rss
طراح قالب

توسط این سورس کد می توانید نوار وظیفه را به سه حالت مخفی - شفاف و عادی در بیاورید این سورس کد به سه دکمه نیاز دارد.

Private Declare Function FindWindow _
Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal _
lpWindowName As String) As Long
Private Declare Function SetWindowLong _
Lib "user32" Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As _
Long, ByVal dwNewLong As Long) As Long
Private Const WS_EX_LAYERED = &H80000
Private Const LWA_COLORKEY = &H1
Private Const LWA_ALPHA = &H2
Private Declare Function _
SetLayeredWindowAttributes _
Lib "user32.dll" (ByVal hwnd As Long, _
ByVal crKey As Long, ByVal bAlpha _
As Byte, ByVal dwFlags As Long) As Long
Private Declare Function ShowWindow _
Lib "user32" (ByVal hwnd As Long, _
ByVal nCmdShow As Long) As Long
Dim Handel As Long

Private Sub Command1_Click()
SetWindowLong Handel, -20, WS_EX_LAYERED
SetLayeredWindowAttributes Handel, 0, 255, LWA_ALPHA
ShowWindow Handel, 1
End Sub

Private Sub Command2_Click()
SetWindowLong Handel, -20, WS_EX_LAYERED
SetLayeredWindowAttributes Handel, 0, 127, LWA_ALPHA
ShowWindow Handel, 1
End Sub

Private Sub Command3_Click()
SetWindowLong Handel, -20, WS_EX_LAYERED
SetLayeredWindowAttributes Handel, 0, 255, LWA_ALPHA
ShowWindow Handel, 0
End Sub

Private Sub Form_Load()
Command1.Caption = "نمایش"
Command2.Caption = "شفاف"
Command3.Caption = "مخفی"
SetWindowLong Handel, -20, WS_EX_LAYERED
Handel = FindWindow("Shell_Traywnd", vbNullString)
End Sub

دسته ها : گرافیک - هندل
جمعه بیست و یکم 1 1388

 توسط این سورس کد می توانید روی پنجره ها نقاشی بکشید.

Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Dim Cl As Boolean

Private Sub Form_Load()
Dim DC As Long
Me.WindowState = 2
Me.AutoRedraw = True
DC = GetDC(GetDesktopWindow)
BitBlt Me.hDC, 0, 0, Width, Height, DC, 0, 0, vbSrcCopy
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Cl = True
PSet (X, Y)
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Cl = True Then Line -(X, Y)
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Cl = False
End Sub

 

دسته ها : گرافیک - هندل
جمعه بیست و یکم 1 1388

 توسط این سورس کد می توانید رنگ صفحه نمایش را مقلوب کنید.

Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long

Private Sub Form_Load()
Dim DC As Long
Me.WindowState = 2
Me.AutoRedraw = True
DC = GetDC(GetDesktopWindow)
BitBlt Me.Hdc, 0, 0, Width, Height, DC, 0, 0, vbSrcInvert
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
End
End Sub

دسته ها : گرافیک - هندل
جمعه بیست و یکم 1 1388
X